package com.iss.lxhproject.service;

import com.iss.lxhproject.dao.GuestDao;
import com.iss.lxhproject.entity.Guest;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GuestService {
    @Autowired
    private GuestDao dao;

    public Integer insertGuest(Guest guest){

        return dao.insertGuest(guest);
    }
    public Integer insertGuestforGuestlist(Guest guest){
        return  dao.insertGuestforGuestlist(guest);
    }
    public List<Guest> selectAllGuest(){
        return dao.selectAllGuest();
    }

    public Integer deleteGuest(Integer[] guest_id){
        return dao.deletGuest(guest_id);
    }

    public Integer updateGuest(Guest guest){
        return dao.updateGuest(guest);
    }

    public Guest selectGuestById(Integer id){
        return dao.selectGuestById(id);
    }
}
